using Asp.Versioning;
using Asp.Versioning.OData;
using Microsoft.OData.ModelBuilder;
using OData.Shared.Models;

namespace OData.WebApi.Configuration;

public class LineItemModelConfiguration : IModelConfiguration
{
	public void Apply(ODataModelBuilder builder, ApiVersion apiVersion, string? routePrefix)
	{
		var lineItem = builder.EntitySet<LineItem>("LineItems").EntityType;
		lineItem.HasKey(li => li.Id);
		//Todo: Add Function configuration and Action configuration
	}
}
